package com.yhb.dao;

import com.yhb.model.RapidCheat;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface RapidCheatMapper {
    void insert(@Param("cheat") RapidCheat cheat);

    RapidCheat query(@Param("id") String id);
    RapidCheat queryLocked(@Param("id") String id);

    void modify(@Param("flow") RapidCheat cheat);

    void remove(@Param("id")String flowId);

    RapidCheat queryByExecutionFlow(@Param("flowColumnName") String columnName, @Param("flowId") String flowId);

    List<RapidCheat> userList(@Param("userId") String userId,
                              @Param("type") RapidCheat.Type type,
                              @Param("createTimeStart") Date createTimeStart,
                              @Param("createTimeEnd") Date createTimeEnd);

    List<RapidCheat> statusListAfter(@Param("type") RapidCheat.Type type,
                                     @Param("status") RapidCheat.Status status,
                                     @Param("createTimeStart") Date createTimeStart);
}
